package org.springblade.modules.admin.service.parts.impl.strategy;

import lombok.extern.slf4j.Slf4j;
import org.springblade.core.secure.utils.AuthUtil;
import org.springblade.modules.admin.enums.TaskStatusEnum;
import org.springblade.modules.admin.service.parts.AbstractOrderStateStrategy;
import org.springblade.modules.admin.vo.parts.PartsExecuteVO;
import org.springframework.stereotype.Service;

/**
 * @Description 待发货策略实现 -> 对应状态3
 * @Author ysq
 * @Date 2024/05/16
 **/
@Slf4j
@Service("shipmentsOrderStrategy")
public class ShipmentsOrderStrategyImpl extends AbstractOrderStateStrategy {
	@Override
	public Object handle(PartsExecuteVO executeParams) {
		return super.handle(executeParams);
	}

	@Override
	public void after(PartsExecuteVO executeParams) {
		// 插入任务追踪日志
		maintainMalfunctionLogService.insertWorkLog(executeParams.getPlanId(),
			TaskStatusEnum.valueOf(executeParams.getEvent()).getName(),
			TaskStatusEnum.valueOf(executeParams.getEvent()).getStatus(),
			null,
			AuthUtil.getUserId(),
			"供应商");
	}
}
